package com.zer0.tga.entity.livingentity.flyingentity;

import com.zer0.tga.art.ArtArchive;
import com.zer0.tga.art.Bitmap;
import com.zer0.tga.entity.Entity;
import com.zer0.tga.entity.livingentity.Teemo;
import com.zer0.tga.level.Level;
import com.zer0.tga.math.Coordinate;
import com.zer0.tga.math.Direction;

public class EnemyBullet extends Bullet {

	public EnemyBullet(Coordinate position, Coordinate radius, Coordinate target, Level level) {
		super(position, radius, target, level);


	}
	
	@Override
	public Bitmap getArt() {
		// TODO Auto-generated method stub
		
		return ArtArchive.bullet2[0][direction];
		
		
	}
	
	public boolean collision(Entity entity, Direction dir) 
    {
		if(entity instanceof Teemo)
		{
			System.out.println("Teemo got hit!");
			((Teemo)entity).hurt(damage);

		}
		else if(entity instanceof Bullet)
		{
			return true;
		}
			this.removed = true;
			return false;

    }

	@Override
	public void init() {
		// TODO Auto-generated method stub
		movementSpeed = 4.0;
		maxLivingTime = 100;
		unitType = UnitType.ENEMY;
		health = maxHealth = 1;
	    damage = 1;
	}

}
